import javax.swing.JOptionPane;


public class Ejercicio2 {
	
	public static void main(String[] args) {
		
		int N = -1;
		boolean ok;
		
		do {

			do {
				try {
					ok = true;
					N = Integer.parseInt(JOptionPane.showInputDialog("ingrese cantidad de rondas"));

					if (N < 0) {
						JOptionPane.showMessageDialog(null,
								"Caracter invalido, intente nuevamente",
								"ERROR", JOptionPane.ERROR_MESSAGE);
						ok = false;
					}
				} catch (Exception e) {
					JOptionPane.showMessageDialog(null,
							"Caracter invalido, intente nuevamente", "ERROR",
							JOptionPane.ERROR_MESSAGE);
					ok = false;
				}
			} while (ok == false);

			if (N != 0) {
				
				String Juan= "";
				String[] JuanArray = new String[N];
				int JuanInt[]= new int [N];
				
				
				do{
					try {
					ok = true;
					Juan = JOptionPane.showInputDialog("ingrese resultados de juan");
					JuanArray = Juan.trim().split(" ");
					
					if (JuanArray.length!=N){
						ok = false;
					}
		
						for(int j = 0; j< JuanArray.length; j++){
							JuanInt[j]=Integer.parseInt(JuanArray[j]);
							if (JuanInt[j]<0 || JuanInt[j]>5){
								ok=false;
							}
						}
					} catch (Exception e) {
						ok = false;
					}
					if(ok==false){
						JOptionPane.showMessageDialog(null,
								"Caracter invalido, intente nuevamente", "ERROR",JOptionPane.ERROR_MESSAGE);
					}
	
				}while(ok==false);
				
				String Maria= "";
				String[] MariaArray = new String[N];
				int MariaInt[]= new int [N];
				
				do{
					try {
					ok = true;
					Maria = JOptionPane.showInputDialog("ingrese resultados de Maria");
					MariaArray = Maria.trim().split(" ");
					
					
					if (MariaArray.length!=N){
						ok = false;
					}
						for(int j = 0; j< MariaArray.length; j++){
							MariaInt[j]=Integer.parseInt(MariaArray[j]);
							if (MariaInt[j]<0 || MariaInt[j]>5){
								ok=false;
							}
						}
					} catch (Exception e) {
						ok = false;
					}
						
					if(ok==false){
						JOptionPane.showMessageDialog(null,
								"Caracter invalido, intente nuevamente", "ERROR",JOptionPane.ERROR_MESSAGE);
					}
					
				}while(ok==false);
				int pares=0,impares=0;
				for(int h=0;h<N;h++){
					if (JuanInt[h]%2==0){
						pares+=1;
					}
					if (MariaInt[h]%2!=0){
						impares+=1;
					}
				}
				
				int result = Math.abs(pares-impares);
				System.out.println(result);
			}
		} while (N != 0);
	}
}